import { createRouter, createWebHistory, } from 'vue-router'
import Home from '../pages/home.vue';
import baseTable from '../pages/baseTable.vue';
import proTable from '../pages/proTable.vue';

export const routes = [
    {
        path: '/',
        redirect: '/home'
    },
    {
        name: 'home',
        path: '/home',
        component: Home
    },
    {
        name: 'baseTable',
        path: '/baseTable',
        component: baseTable
    },
    {
        name: 'proTable',
        path: '/proTable',
        component: proTable
    },
]
const router = createRouter({
    scrollBehavior: () => ({ left: 0, top: 0 }),
    history: createWebHistory(),
    routes,
})
router.beforeEach((to, from, next) => {
    next()
})
export default router
